-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eight Additional layout renders for NLog.Web #784
Conversation
I see, I need to fix 4 code smell, I will do that soon. |
src/Shared/LayoutRenderers/AspNetRequestClientCertificateLayoutRenderer.cs
Outdated
Show resolved
Hide resolved
src/Shared/LayoutRenderers/AspNetLayoutMultiValueRendererBase.cs
Outdated
Show resolved
Hide resolved
src/Shared/LayoutRenderers/AspNetRequestWebSocketNegotiatedProtocolLayoutRenderer.cs
Outdated
Show resolved
Hide resolved
src/Shared/LayoutRenderers/AspNetLayoutMultiValueRendererBase.cs
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
Think it looks great, and excellent unit-test coverage. |
Created #786 that changes AspNetRequestIsWebSocketLayoutRenderer from "true" / "false" to "1" / "0" |
Created wiki-pages: https://github.com/NLog/NLog/wiki/AspNet-Request-Duration-Layout-Renderer |
You are welcome! |
I guess if we should follow semver, then with all these new features/funcationality, then next version should be |
I agree. With response cookie PR and the earlier PR that is a total of 9 new layout renders. I am going to start work on a 'public bool Verbose' property for response cookie layout renderer that will also log the domain, path, expire, etc of the cookie. For the Json output format, i will do just with StringBuilder.Append() and not use System.text.Json or Newtonsoft.Json. Then I will add the response body to the request body middleware. This one I already have a version working for 18 months at my employer. Then I will try to do HttpModule version of request and response body logging. I find a legacy .NET 4.8 ASPX application at my employer I can test this with. After that I may look at up-for-grab features at NLog. |
Then I will not press the release-button just yet.
Notice #785 have introduced a basic HttpModule for ASP.NET Classic ( |
Updated https://nlog-project.org/config/?tab=layout-renderers with the new LayoutRenderers for NLog.Web.AspNetCore v5.1 |
Updated https://nlog-project.org/documentation/v5.0.0/html/N_NLog_Web_LayoutRenderers.htm with the new LayoutRenderers for NLog.Web.AspNetCore v5.1 |
Eight additional layout renders
Client certificate
Remote Port
Local Address
Local Port
Is Web socket request
Web socket requested protocols
Response Content Type
Response Headers
Response Cookies will be separate PR since that require add of Microsoft.AspNetCore.Http.Extensions NuGet package.